<?php

	if ($_GET['username']) {//有搜索条件

		$userWhere="username like '%".$_GET['username']."%'";
		if ($this->user['uid'] == 1) {//超级管理员

			$sql="select * from {$this->prename}chongzhi where ".$userWhere." order by cz_id desc";
			$data=$this->getPage($sql, $this->page, $this->pageSize);
			
		}else{//其他合伙人管理员
			
			$sql="select * from {$this->prename}chongzhi where dingji_id=".$this->user['uid']." and ".$userWhere." order by cz_id desc";
			$data=$this->getPage($sql, $this->page, $this->pageSize);

		}

	}else{

		if ($this->user['uid'] == 1) {//超级管理员

			$sql="select * from {$this->prename}chongzhi  order by cz_id desc";
			$data=$this->getPage($sql, $this->page, $this->pageSize);
			
		}else{//其他合伙人管理员
			
			$sql="select * from {$this->prename}chongzhi where dingji_id=".$this->user['uid']." order by cz_id desc";
			$data=$this->getPage($sql, $this->page, $this->pageSize);

		}
	}

	
	// print_r($data);exit;
?>
<style type="text/css">
	.suibian{
		position: fixed;
		top: 12%;
		left: 25%;
	}
	.imgs{
		display: block;
		width: 500px;
	}
</style>
<div class="suibian"><img class="imgs" src=""></div>
<table class="tablesorter" cellspacing="0">
<input type="hidden" value="<?=$this->user['username']?>" />
<thead>
    <tr>
        <th>UserID</th>
        <th>用户名</th>
		<th>付款人</th>
        <th>银行卡号</th>
        <th>转账金额</th>
        <th>备注说明</th>
        <th>凭证</th>
        <th>申请时间</th>
        <th>状态</th>
        <th>处理时间</th>
        <th>操作</th>
    </tr>
</thead>
<tbody id="nav01">
<?php if($data['data']) foreach($data['data'] as $var){ ?>
    <tr>
        <td><?=$var['uid']?></td>
        <td><?=$var['username']?></td>
		<td><?=$var['names']?></td>
        <td><?=$var['bank_hm']?></td>
        <td><?=$var['moneys']?></td>
        <td><?=$var['beizhu']?></td>
        <td><img class="pics" width="50" height="50" src="http://www.168caipiaowap.com/<?=$var['pic']?>"></td>
        <td><?=date('Y-m-d H:i:s', $var['add_time'])?></td>
        <td><?php if($var['status'] == 0){ ?><a style="color: #77BACE;" width="420">未审核</a><?php }else{ ?><a style="color: #77BACE;" width="420">已审核</a><?php } ?></td>
        <td><?=date('Y-m-d H:i:s', $var['upd_time'])?></td>
        <td>
            <?php if(!$var['status']){ ?>
            <a href="/admin778899.php/business/rechargeActionModalss/<?=$var['cz_id']?>" target="modal"  width="420" title="编辑用户" modal="true" button="确定:dataAddCode|取消:defaultCloseModal">审核</a>
            <?php }?>
            
        </td>
    </tr>
<?php }else{ ?>
    <tr>
        <td colspan="9" align="center">暂时没有充值记录。</td>
    </tr>
<?php } ?>
</tbody>
</table>

<footer>
    <?php
		$rel=get_class($this).'/rechargeLog-{page}?'.http_build_query($_GET,'','&');
		$this->display('inc/page.php', 0, $data['total'], $rel, 'defaultReplacePageAction');
	?>
</footer>
<script type="text/javascript">  
ghhs("nav01","tr");

	$('.pics').hover(function(){
		var pics = $(this).prop('src');
		$('.imgs').prop('src',pics);
		$('.suibian').show();
	},function(){
		$('.suibian').hide();
	})


</script>